home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / msdl / example.lha / example-scenes / tableandchairs.lha / tableandchairs.msdl next >
Encoding:
Text File  |  1993-11-03  |  2.2 KB  |  181 lines

  1. /* the view might be correct here, I use my own viewing coords. */
  2. /* the table is about 7x7x2, nothing much else to say about it */
  3. /* D. Hutchinson */
  4.  
  5. view
  6.   from        10 10 7.5
  7.   towards    4.5 3 0
  8.   up        0 0 1
  9.   window    14 -14 14 -14        /* Umax Umin Vmax Vmin */
  10. end
  11.  
  12. defobj
  13.   xysquare    /* normal along -z */
  14.  
  15.   shift -0.5 -0.5 -0.5
  16.  
  17.   polygon
  18.   4
  19.   0 0 0
  20.   0 1 0
  21.   1 1 0
  22.   1 0 0
  23.   end
  24. end
  25.  
  26. defobj
  27.   slab
  28.  
  29.   instobj xysquare end
  30.  
  31.   instobj xysquare rotate y 180 end
  32. end
  33.  
  34. defobj
  35.   unit_box
  36.    box 
  37.       0 0 0
  38.       1.0 1.0 1.0
  39.    end
  40. end
  41.  
  42. defprops
  43.   wood
  44.   drc 0.7725 0.6863 0.4353
  45. end
  46.  
  47. defprops
  48.   darkwood
  49.   drc 0.6745 0.5373 0.3882
  50. end
  51.  
  52. defprops
  53.   grey
  54.   drc 0.6 0.6 0.6
  55. end
  56.  
  57. defobj    /* AABB: 0 0 0, 2.1 2 3 */
  58.   chair
  59.  
  60.   instprops grey
  61.   shift -1 0 0
  62.  
  63.   instobj unit_box    /* sit on bit */
  64.     scale 2 2 0.15
  65.     shift 0.1 0 1.5
  66.     instprops wood
  67.   end
  68.  
  69.   instobj unit_box    /* leg1 */
  70.     scale 0.1 0.1 3
  71.   end
  72.  
  73.   instobj unit_box    /* leg2 */
  74.     scale 0.1 0.1 3
  75.     shift 0 1.9 0
  76.   end
  77.  
  78.   instobj unit_box
  79.     scale 0.1 0.1 1.5
  80.     shift 2 0 0
  81.   end
  82.  
  83.   instobj unit_box
  84.     scale 0.1 0.1 1.5
  85.     shift 2 1.9 0
  86.   end
  87.  
  88.   instobj unit_box    /* back rest */
  89.     scale 0.15 2 0.7
  90.     shift 0.1 0 2.3
  91.     instprops wood
  92.   end
  93. end
  94.  
  95. /*light */
  96. instobj xysquare
  97.   props emission 2 2 2 end
  98.   rotate z 45
  99.   shift 3 4 10
  100. end
  101.  
  102. /* floor */
  103. polygon
  104.   4
  105.   0 0 0
  106.   1 0 0
  107.   1 1 0
  108.   0 1 0
  109.   instprops grey
  110.   scale 40 40 1
  111.   shift -20 -20 0
  112. end
  113.  
  114.  
  115.  
  116. /* 4 chairs */
  117.  
  118. instobj
  119.   chair
  120.   name chair_i1
  121. end
  122.  
  123. instobj
  124.   chair
  125.   name chair_i2
  126.   shift 0 3 0
  127. end
  128.  
  129. instobj
  130.   chair
  131.   name chair_i3
  132.   shift -1.05 -1 0
  133.   rotate z 180
  134.   shift 6.05 1 0
  135. end
  136.  
  137. instobj
  138.   chair_i3
  139.   name chair_i4
  140.   shift 0 3 0
  141. end
  142.  
  143. instobj chair rotate z 30 rotate y 40 rotate x 50 shift 3 3 2.4 end
  144.  
  145. /* table */
  146. compobj        /* AABB: 0.5 -1 0, 6.5 6 2.2 */
  147.   name table 
  148.  
  149.  
  150.   instobj unit_box
  151.   instprops darkwood
  152.     scale 6 7 0.2
  153.     shift 0.5 -1 2
  154.   end
  155.  
  156.   instobj unit_box    /* leg 1 */
  157.   instprops darkwood
  158.     scale 0.2 0.2 2
  159.     shift 0.6 -0.9 0
  160.   end
  161.  
  162.   instobj unit_box    /* leg 2 */
  163.   instprops darkwood
  164.     scale 0.2 0.2 2
  165.     shift 0.6 5.7 0
  166.   end
  167.  
  168.   instobj unit_box    /* leg 3 */
  169.   instprops darkwood
  170.     scale 0.2 0.2 2
  171.     shift 6.2 -0.9 0
  172.   end
  173.  
  174.   instobj unit_box    /* leg 4 */
  175.   instprops darkwood
  176.     scale 0.2 0.2 2
  177.     shift 6.2 5.7 0
  178.   end
  179.  
  180. end
  181.